package com.miraclemiles.oauth.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @auther zhoudong
 * @date 2021/9/2 13:54
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    private PasswordEncoder passwordEncoder;

    @GetMapping("/encode")
    public String encode(String str) {
        return passwordEncoder.encode(str);
    }

    @GetMapping("/list")
    public String list(String str) {
        return "test -> list";
    }

}
